winbrew_engines\windows\exe/
mod.rs

1//! Native executable installation and removal for Windows.
2//!
3//! This backend handles installer families that are executed as processes
4//! rather than unpacked as files:
5//!
6//! - generic native `.exe` installers when explicit switches are provided
7//! - Inno Setup installers
8//! - Nullsoft / NSIS installers
9//! - Burn bootstrapper installers
10//!
11//! What this module does:
12//!
13//! - validates the installer path, install directory, and package name before
14//!   starting work
15//! - parses installer switches literally and rejects duplicate installer
16//!   switches before execution, so catalog mistakes fail fast instead of being
17//!   silently normalized
18//! - launches the downloaded installer as a process and treats the Windows
19//!   installer success codes `0`, `1641`, and `3010` as successful outcomes
20//! - captures uninstall metadata from the Windows uninstall registry when it
21//!   can, so later removal can reuse the recorded command
22//! - falls back to direct directory cleanup when uninstall metadata is missing
23//!   or the uninstall command fails
24//!
25//! What this module does not do:
26//!
27//! - it does not extract archives or copy payload files
28//! - it does not infer installer family from URLs alone
29//! - it does not own MSIX / App Installer behavior, which lives in the MSIX
30//!   module
31
32mod install;
33mod metadata;
34mod remove;
35mod switches;
36mod validation;
37
38#[cfg(test)]
39mod tests;
40
41pub(crate) use install::install;
42pub(crate) use remove::remove;
43
44pub(super) const NATIVE_EXE_SUCCESS_EXIT_CODES: &[i32] = &[0, 1641, 3010];